/**
 * 用户登录注册路由模块
 */
const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const { reg_schema,login_schema} = require('../schema/user')

// 导入用户处理模块
const userHandler = require('../router_handler/user')

// 用户注册
router.post('/registerUser', userHandler.regUser)
// 用户登录
router.post('/loginUser', expressJoi(login_schema), userHandler.loginUser)
// 获取用户信息
router.get('/getUserinfo', userHandler.getUserinfo)
// 用户登出
router.post('/logout', userHandler.logout)


module.exports = router
